.class public Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;
.super Lcom/waiqin365/lightapp/im/contactlist/ContactListActivity;


# instance fields
.field private e:Lcom/waiqin365/lightapp/kehu/share/a/c;

.field private f:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Lcom/waiqin365/lightapp/im/contactlist/ContactListActivity;-><init>()V

    return-void
.end method


# virtual methods
.method protected a(I)V
    .locals 7

    const v3, 0x7f0806b1

    const/4 v6, 0x1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->d:Lcom/waiqin365/lightapp/im/contactlist/a/a;

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/im/contactlist/a/a;->a()Ljava/util/ArrayList;

    move-result-object v0

    add-int/lit8 v1, p1, -0x1

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/share/a/c;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->e:Lcom/waiqin365/lightapp/kehu/share/a/c;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->e:Lcom/waiqin365/lightapp/kehu/share/a/c;

    iget-object v0, v0, Lcom/waiqin365/lightapp/kehu/share/a/c;->a:Ljava/lang/String;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->e:Lcom/waiqin365/lightapp/kehu/share/a/c;

    iget-object v1, v1, Lcom/waiqin365/lightapp/kehu/share/a/c;->n:Ljava/lang/String;

    invoke-static {}, Lcom/waiqin365/base/login/mainview/a;->a()Lcom/waiqin365/base/login/mainview/a;

    move-result-object v2

    invoke-virtual {v2, p0}, Lcom/waiqin365/base/login/mainview/a;->i(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/waiqin365/lightapp/im/activity/AlertDialog;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string/jumbo v1, "title"

    invoke-virtual {p0, v3}, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string/jumbo v1, "msg"

    const v2, 0x7f080748

    invoke-virtual {p0, v2}, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->startActivity(Landroid/content/Intent;)V

    :goto_0
    return-void

    :cond_0
    const-string/jumbo v0, "1"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_2

    const-string/jumbo v0, "3"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/waiqin365/lightapp/im/activity/AlertDialog;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string/jumbo v1, "title"

    invoke-virtual {p0, v3}, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string/jumbo v1, "msg"

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f080306

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->startActivity(Landroid/content/Intent;)V

    goto :goto_0

    :cond_1
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/waiqin365/lightapp/im/activity/AlertDialog;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string/jumbo v1, "title"

    invoke-virtual {p0, v3}, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string/jumbo v1, "msg"

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f080309

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->startActivity(Landroid/content/Intent;)V

    goto :goto_0

    :cond_2
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/waiqin365/lightapp/im/activity/AlertDialog;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string/jumbo v1, "cancel"

    invoke-virtual {v0, v1, v6}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    const-string/jumbo v1, "msg"

    const v2, 0x7f0802e8

    new-array v3, v6, [Ljava/lang/Object;

    const/4 v4, 0x0

    iget-object v5, p0, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->e:Lcom/waiqin365/lightapp/kehu/share/a/c;

    iget-object v5, v5, Lcom/waiqin365/lightapp/kehu/share/a/c;->b:Ljava/lang/String;

    aput-object v5, v3, v4

    invoke-virtual {p0, v2, v3}, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    invoke-virtual {p0, v0, v6}, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->startActivityForResult(Landroid/content/Intent;I)V

    goto/16 :goto_0
.end method

.method protected onActivityResult(IILandroid/content/Intent;)V
    .locals 7

    const/4 v0, -0x1

    if-ne p2, v0, :cond_1

    :try_start_0
    sget-object v0, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->c:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->finish()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->e:Lcom/waiqin365/lightapp/kehu/share/a/c;

    if-nez v1, :cond_0

    :goto_1
    return-void

    :cond_0
    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->e:Lcom/waiqin365/lightapp/kehu/share/a/c;

    iget-object v1, v1, Lcom/waiqin365/lightapp/kehu/share/a/c;->a:Ljava/lang/String;

    invoke-static {p0}, Lcom/waiqin365/base/db/offlinedata/m;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/offlinedata/m;

    move-result-object v2

    invoke-virtual {v2, v1}, Lcom/waiqin365/base/db/offlinedata/m;->e(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-static {p0}, Lcom/waiqin365/base/db/offlinedata/m;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/offlinedata/m;

    move-result-object v3

    invoke-virtual {v3, v1}, Lcom/waiqin365/base/db/offlinedata/m;->f(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    invoke-static {}, Lcom/waiqin365/base/login/mainview/a;->a()Lcom/waiqin365/base/login/mainview/a;

    move-result-object v4

    invoke-virtual {v4, p0}, Lcom/waiqin365/base/login/mainview/a;->k(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v4

    const-string/jumbo v5, "chatType"

    const/4 v6, 0x1

    invoke-virtual {v0, v5, v6}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const-string/jumbo v5, "toChatUsername"

    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string/jumbo v6, "_"

    invoke-virtual {v4, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    iget-object v6, p0, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->e:Lcom/waiqin365/lightapp/kehu/share/a/c;

    iget-object v6, v6, Lcom/waiqin365/lightapp/kehu/share/a/c;->a:Ljava/lang/String;

    invoke-virtual {v4, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v0, v5, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string/jumbo v4, "userId"

    invoke-virtual {v0, v4, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string/jumbo v1, "pic_url"

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string/jumbo v1, "userName"

    invoke-virtual {v0, v1, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string/jumbo v1, "forward_msg_id"

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->f:Ljava/lang/String;

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->startActivity(Landroid/content/Intent;)V

    const v0, 0x7f040022

    const v1, 0x7f040021

    invoke-virtual {p0, v0, v1}, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->overridePendingTransition(II)V

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->finish()V

    :cond_1
    invoke-super {p0, p1, p2, p3}, Lcom/waiqin365/lightapp/im/contactlist/ContactListActivity;->onActivityResult(IILandroid/content/Intent;)V

    goto :goto_1

    :catch_0
    move-exception v0

    goto :goto_0
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 2

    invoke-super {p0, p1}, Lcom/waiqin365/lightapp/im/contactlist/ContactListActivity;->onCreate(Landroid/os/Bundle;)V

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string/jumbo v1, "forward_msg_id"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->f:Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ForwardMessageActivity;->a:Landroid/widget/RelativeLayout;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/RelativeLayout;->setVisibility(I)V

    return-void
.end method
